package creation.abstractfactory.common;

/**
 * 场景类
 *
 * @author wangjinqiang
 * @date 2019-08-04
 */
public class Client {
    public static void main(String[] args) {
        // 定义两个工厂
        AbstractCreator creator1 = new Creator1();
        AbstractCreator creator2 = new Creator2();

        // 生产 A1，B1
        creator1.createProductA().doSomething();
        creator1.createProductB().doSomething();

        // 生产 A2，B2
        creator2.createProductA().doSomething();
        creator2.createProductB().doSomething();
    }
}
